<?php

/*
*###########################################################################################################################*
#															    															#
#															    															#
#    **  ** ****** ** **  **  ****** ** ***   ** ***   ****** ** **  **  ** **  ** ** **  **    ****   ** **  **  ******    #
#    **  ** ****** ********** ****** *******  *******  ****** ********** ** **  ** **********  ******  ********** ******    #
#    **  ** **  ** **  **  ** **     ***   ** **    ** **     **  **  **    **  ** **  **  ** ***   ** **  **  ** **        #
#    ****** **  ** **  **  ** ****** **   *** **   *** ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    ****** **  ** **  **  ** ****** *******  *******  ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    **  ** **  ** **  **  ** **     *****    ******   **     **  **  ** ** **  ** **  **  ** ***   ** **  **  **     **    #
#    **  ** ****** **  **  ** ****** **       **  ***  ****** **  **  ** ** ****** **  **  **  ******  **  **  ** ******    #
#    **  ** ****** **  **  ** ****** **       **   *** ****** **  **  ** **  ** ** **  **  **   ****   **  **  ** ******    #
#															    															#
#															    															#
#															    															#
#    2010 - 2011 © HomePremiumCMS made by HomePemium as PremiumEye & Security by HomePremium and Merijnz		    		#
#															    															#
#    Powered by PhoenixPHP 3.7.1 (build 138000)										    									#
#															    															#
#															    															#
#															    															#
*###########################################################################################################################*
*/

?>

<div id="stream_container2" style="left: 10px; top:<?php if($core->EscapeString($users->UserInfo($username, 'header_info')) == "0"){ ?>166<?php }else{?>114<?php } ?>px; position:fixed;height: auto;overlow: hidden;z-index: 999;">

<div id="stream_top" onMouseDown="dragStart(event, 'stream_container2')">

<a href="me.php" onClick="sluitDiv('stream_container2')"><div id="stream_kruisje"></div></a>

</div>

<div id="stream_middle">

<div id="stream_input_container">

<script type="text/javascript">//<![CDATA[ 

 function blah(form_obj)
{
    if (form_obj.bericht.value != 'bericht' && form_obj.bericht.value != '')
        form_obj.submitBut.disabled = false;
    else
        form_obj.submitBut.disabled = true;
} 
//]]>  

</script>

<form name="form" method="post" target="_parent" action="functions/post_stream.php">
    
	<input type="hidden" name="poster" value="<?php echo $core->EscapeString($users->UserInfo($username, 'username')); ?>" />
    
    <input type="hidden" name="poster_look" value="<?php echo $core->EscapeString($users->UserInfo($username, 'look')); ?>" />
    
    <input type="hidden" name="www" value="http://<?php echo $_SERVER['SERVER_NAME']; $_?>" />  
    
    <input type="text" name="bericht" id="input_stream" style="height: 20px; width: 165px; float: left;" maxlength="140" value="" placeholder="Zeg het maar.. ?" onfocus="if (this.value == &#39;bericht&#39;) this.value = &#39;&#39;;" onkeyup="blah(document.form);">
    
    <input type="submit" name="submitBut" id="stream_submit_button" disabled="true" value="">
    
    </form>
    
</div>

<div id="stream_middle_tekst">

	<div class="stream" id="stream_middle_container" style="max-height:500px; overflow:auto;overflow-x:hidden;">
    
<table width="100%">
        
<style type="text/css">
#stream_avatar {
height: 65px;
width: 64px;
float: left;
margin-top: -16px;
margin-left: -15px;
}
</style>
        
        <?php
		$stream = mysql_query("SELECT * FROM stream ORDER BY posted_on DESC LIMIT 50");
		$color = 'stream_odd';
		while($berichten = mysql_fetch_array($stream))
		{
		?>
        <tr>
        
        <td>
        
        <div class="<?php echo $color; ?>">
        
        	<div id="stream_avatar" style="background-image: url(http://www.habbo.com/habbo-imaging/avatarimage?figure=<?php echo $berichten['poster_look']; ?>);"></div>
            
            <div style="width: 160px; float: right; ">
            
        	<a href="home.php?u=<?php echo $berichten['poster']; ?>" style="font-weight: bold; text-decoration: underline;"><?php echo $berichten['poster']; ?></a><br>
            
            <?php echo $berichten['bericht']; ?>
            
            <div id="stream_posted"><?php echo @date("d-m-Y",$berichten['posted_on']); ?></div>
            
            </div>
            
		</div>
        
        </td>
        
        </tr>
        
        <?php
		if($color == 'stream_odd')
			$color='stream_even';
			else
			$color='stream_odd';
		}
		?>
        
        </table>

    </div>
    
    <div style="margin-top: 5px;">
    
    	<img align="left" style="padding-right: 3px;" src="../Public/Styles/Default/Images/stream/vraagteken_icon.png">
        
    		<div style="padding-top: 2px;">
            
            	<font color="#FFFFFF" size="2" style="text-decoration:underline; cursor: pointer;">
                
                	<a href="#" target="_self" onclick="openDiv(&#39;stream_info_container&#39;).style.display = &#39;none&#39;;" style="color: white;">Stream info</a>
                    
                </font>
                
            </div>
         
    </div>

</div>

</div>
            
    
			
			<div id="stream_bottom"></div>
                   
		</div>